package com.wyh.logisticsservice.Listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import wyh.orderservice.constants.Constants;
import wyh.orderservice.model.OrderInfo;

@RabbitListener(queues = Constants.ORDER_QUEUE)
@Component
public class LogisticsListener {
    @RabbitHandler
    public void handler1(String msg){
        System.out.println("handler1 [订单处理成功] " + msg);
    }

    @RabbitHandler
    public void handler2(OrderInfo orderInfo){
        System.out.println("handler2 [订单处理成功] " + orderInfo);
    }
}
